home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 030a / tbscan31.zip / TBS.BAT < prev    next >
DOS Batch File  |  1991-12-12  |  3KB  |  94 lines

  1. @echo off
  2.  
  3. rem     This is an example TbScan invokation batch file.
  4. rem     You may edit this file to suit your needs.
  5.  
  6. rem     There are three default scan mnemonics defined:
  7. rem     'quick', 'daily' and 'monthly'.
  8. rem     You can invoke a daily scan session with:
  9. rem             TBS daily
  10. rem     You can optionally specify additional options like:
  11. rem             TBS daily -quick
  12. rem     The same applies to 'monthly' and 'quick'.
  13.  
  14. rem     If the user does not specify any option a help file will be
  15. rem     displayed.
  16. rem     If the user specifies a non recognised option, TbScan will be
  17. rem     invoked with that option. If TbScan does not recognise the option
  18. rem     too, it will abort with an errorlevel, and the help info will
  19. rem     be displayed anyway.
  20.  
  21. rem     If TbScan detects a virus, an informative text will be displayed.
  22.  
  23. if '%1'=='quick' goto quick
  24. if '%1'=='QUICK' goto quick
  25. if '%1'=='daily' goto daily
  26. if '%1'=='DAILY' goto daily
  27. if '%1'=='monthly' goto monthly
  28. if '%1'=='MONTHLY' goto monthly
  29.  
  30. if '%1'=='' goto help
  31.  
  32. TbScan %1 %2 %3 %4 %5 %6 %7 %8 %9
  33. if errorlevel 2 goto help
  34. if errorlevel 1 goto virus
  35. goto end
  36.  
  37. :quick
  38. rem     Scan only the DOS directories and make no log file.
  39. rem     If TbScan detects a virus a daily scan session will be performed
  40. rem     automatically.
  41. TbScan c:\bin c:\dos c:\system -quick %2 %3 %4 %5 %6 %7 %9
  42. if errorlevel 2 goto help
  43. if errorlevel 1 goto daily
  44. goto end
  45.  
  46. :daily
  47. rem     Scan drive C completely and add information to the log file.
  48. TbScan c:\ -log %2 %3 %4 %5 %6 %7 %8 %9
  49. if errorlevel 2 goto help
  50. if errorlevel 1 goto virus
  51. goto end
  52.  
  53. :monthly
  54. rem     Scan drive C completely using -analyze and make a new log file.
  55. TbScan c:\ -session -analyze %2 %3 %4 %5 %6 %7 %8 %9
  56. if errorlevel 2 goto help
  57. if errorlevel 1 goto virus
  58. goto end
  59.  
  60. :virus
  61. rem     TbScan detected a virus. Lock the system and urge the user to
  62. rem     contact the help desk.
  63. rem     Of course you can also type a file or even start a specific
  64. rem     program here.
  65. cls
  66. echo -
  67. echo                                    WARNING!!!
  68. echo                    TbScan detected one or more viruses!
  69. echo -
  70. echo                      Do NOT use this machine anymore,
  71. echo               and contact the security officer immediately!
  72. echo -
  73. echo       You can also phone ESaSS for technical support: +31-80-787881
  74. echo -
  75. :loop
  76. goto loop
  77.  
  78. :help
  79. rem     The user entered an illegal option. Give him/her some support.
  80. echo -
  81. echo Command line error detected!
  82. echo -
  83. echo The following batch file options are available:
  84. echo   TBS quick      Performs a quick scan on the system directories
  85. echo   TBS daily      Invoke the daily scan session and add info to the log file
  86. echo   TBS monthly    Invoke the monthly analyze session and clear the log file
  87. echo -
  88. echo Additional options may be specified. Consult the TbScan manual or:
  89. pause
  90. TbScan -help
  91.  
  92. :end
  93.  
  94.